package com.koron.order.perambulate.bean.excel;

import com.koron.order.perambulate.bean.vo.LinePerambulateVo;
import org.springframework.stereotype.Service;

/**
 * @ClassName: LinePerambulateConvertor
 * @Description:
 * @Date: 2023/2/1
 * @Author: 李一辰
 * @Version: 1.0
 **/
@Service
public class LinePerambulateConvertor {

    public LinePerambulateVo ExceltoVO(LinePerambulateExcel linePerambulateExcel){

        if(linePerambulateExcel == null){
            return new LinePerambulateVo();
        }
        LinePerambulateVo linePerambulateVo = new LinePerambulateVo();
        linePerambulateVo.setClosestDistanceLine(linePerambulateExcel.getClosestDistanceLine());
        linePerambulateVo.setClosestDistanceTower(linePerambulateExcel.getClosestDistanceTower());
        linePerambulateVo.setLatitude(linePerambulateExcel.getLatitude());
        linePerambulateVo.setEquipmentName(linePerambulateExcel.getEquipmentName());
        linePerambulateVo.setLongitude(linePerambulateExcel.getLongitude());
        linePerambulateVo.setRemark(linePerambulateVo.getRemark());
        linePerambulateVo.setRiskKeyword(linePerambulateExcel.getRiskKeyword());
        linePerambulateVo.setRiskLevel(linePerambulateExcel.getRiskLevel());
        linePerambulateVo.setRiskSub(linePerambulateExcel.getRiskSub());
        linePerambulateVo.setTowerNumber(linePerambulateExcel.getTowerNumber());

        return linePerambulateVo;
    }
}
